<template>
  <a-modal
    :title="title"
    :width="1300"
    :visible="visible"
    :closable="true"
    :footer="null"
    @close="close"
    @cancel="handleCancel">
     <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :pagination="false"
        :dataSource="dataSource"
        :loading="loading"
        :scroll="{ x: 'calc(500px + 50%)' }">
      </a-table>
  </a-modal>
</template>

<script>


  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  export default {
    name: 'AdhCouponListModal',
     mixins:[JeecgListMixin],
     
    data() {
      return {
        title:'商家优惠券核销记录',
        width:800,
        visible: false,
        disableSubmit: true,
        url: {
          list: "/order/adhCouponOrder/merchList",
        },
        queryParam: {merchId:''},
        columns: [
            {
                title:"优惠券名称",
                align:"center",
                width: 150,
                dataIndex:"couponName",
            },
             {
                title:"优惠券码",
                align:"center",
                width: 110,
                dataIndex:"couponNo",
            },
            {
                title:"领取时间",
                align:"center",
                width: 120,
                dataIndex:"receiveDate",
            },
             {
                title:"会员信息",
                align:"center",
                width: 250,
                dataIndex:"userName",
                 ellipsis:true,
                customRender:function (text,row) {
                  return  (row.userName?row.userName:'')+" "+(row.userPhone?row.userPhone:'')
                }
            },
              {
                title:"核销时间",
                align:"center",
                width: 150,
                dataIndex:"checkDate",
            },
              {
                title:"核销人手机号",
                align:"center",
                width: 110,
                dataIndex:"checkUser",
            },
        ],
      }
    },
    methods:{
      close () {
        this.$emit('close');
        this.visible = false;
      },
      showModel:function(record){
        this.queryParam.merchId = record.id
        this.searchQuery();
        this.visible = true
      },
      handleCancel () {
        this.close()
      },
    }
  }
</script>

<style scoped>
</style>